import Layout from '../components/Layout.vue'

let routes = [
    {
        path: '/Login',
        meta: {
            title: '登录',
            hidden: true,
        },
        component: () => import('../views/Login.vue')
    },
    {
        path: '/ArticleDetails',
        meta: {
            title: '文章详情',
            hidden: true
        },
        component: () => import('../views/ArticleDetails.vue')

    },
    {
        path: '/ArticleEditor',
        meta: {
            title: '文章编辑',
            hidden: true
        },
        component: () => import('../views/ArticleEditor.vue')

    },
  
    



    {
        path: '/',
        redirect:'/HomepageManagement/Homepage',
        name:'后台管理',                
        meta: {
            title: '后台管理',
            icon: 'el-icon-notebook-1',
            hidden: true,
        },
        component: Layout,
        children: [
            {
                path: 'HomepageManagement',
                name:'首页管理',
                meta: {
                    title: '首页管理',
                    icon: 'el-icon-user',
                    hidden:true,
                },
                component: () => import('../views/management/HomepageManagement.vue'),
                children:[{
                    path:'Homepage',
                    name:'首页',
                    meta: {
                        title: '首页',
                        icon: 'el-icon-s-home',
                        hidden:true,
                    },
                    component: () => import('../views/Homepage.vue'),
                }]
               
            },
            {
                path: 'UserManagement',
                name:'用户管理',
                meta: {
                    title: '用户管理',
                    icon: 'el-icon-user',
                    hidden:true,
                },
                component: () => import('../views/management/UserManagement.vue'),
                children:[{
                    path:'User',
                    name:'用户',
                    meta: {
                        title: '用户管理',
                        icon: 'el-icon-user',
                    },
                    component: () => import('../views/Users.vue')
                }]
            },

            {
                path: 'AdministratorManagement',
                 name:'管理员管理',
                meta: {
                    title: '管理员管理',
                    icon: 'el-icon-edit',
                    hidden: true,
                },
                component: () => import('../views/management/AdministratorManagement.vue'),
                children: [
                    {
                        path: 'Administrator',
                        name:'管理员',
                        meta: {
                            title: '管理员管理',
                            icon: 'el-icon-edit-outline',
                        },
                        component: () => import('../views/Administrator.vue')
                    }
                ]
            },
        
            {
                //文章管理
                path: 'ArticleManagement',
                name:'文章管理',
                meta: {
                    title: '文章管理',
                    icon: 'el-icon-notebook-1',
                },
                component: () => import('../views/management/ArticleManagement.vue'),
                children: [{
                    path: 'ArticleType',
                    name:'文章类型',
                    meta: {
                        title: '文章类型',
                        icon: 'el-icon-document-remove',
                    },
                    component: () => import('../views/ArticleType.vue')
                },
                {
                    path: 'Article',
                    name:'文章',
                    meta: {
                        title: '文章',
                        icon: 'el-icon-document',
                    },
                    component: () => import('../views/Article.vue'),
                    children: [
                        {
                            path: 'ArticlePublished',
                            name:'文章已发布',
                            meta: {
                                title: '文章已发布',
                                icon: 'el-icon-circle-check',
                            },
                            component: () => import('../views/ArticlePublished.vue')
                        },
                        {
                            path: 'ArticleNotPublished',
                            name:'文章未发布',
                            meta: {
                                title: '文章未发布',
                                icon: 'el-icon-warning-outline',
                            },
                            component: () => import('../views/ArticleNotPublished.vue')
                        },
                        {
                            path: 'ArticleAdd',
                            name:'文章添加',
                            meta: {
                                title: '文章添加',
                                icon: 'el-icon-circle-plus-outline',
                            },
                            component: () => import('../views/ArticleAdd.vue'),

                        },
                        {
                            path: 'ArticlePicture',
                            name:'文章封面',
                            meta: {
                                title: '文章封面',
                                hidden: true
                            },
                            component: () => import('../views/ArticlePicture.vue')
                    
                        },
                    ]
                }
                ]
        
            },
            {
                path: 'WebsiteManagement',
                name:'网站管理',
                meta: {
                    title: '网站管理',
                    icon: 'el-icon-monitor',
                },
                component: () => import('../views/management/WebsiteManagement.vue'),
                children: [
                    {
                        path: 'RotationChart',
                        name:'轮播图',
                        meta: {
                            title: '轮播图',
                            icon: 'el-icon-view',
                        },
                        component: () => import('../views/RotationChart.vue')
                    },
                    {
                        path: 'QRCode',
                        name:'二维码',
                        meta: {
                            title: '二维码',
                            icon: 'el-icon-news',
                        },
                        component: () => import('../views/QRCode.vue')
                    },
        
                    {
                        path: 'WebsiteInformation',
                        name:'网站信息',
                        meta: {
                            title: '网站信息',
                            icon: 'el-icon-message',
                        },
                        component: () => import('../views/WebsiteInformation.vue')
                    },
                    {
                        path: 'AboutOur',
                        name:'关于我们',
                        meta: {
                            title: '关于我们',
                            icon: 'el-icon-collection',
                        },
                        component: () => import('../views/AboutOur.vue')
                    },
                ]
            },
        ]

    },
   

    
   


    // {
    //     path: '/',
    //     meta: {
    //         title: '首页',
    //         icon: 'el-icon-notebook-1',
    //         hidden: true,
    //     },
    //     //重定向
    //     redirect: { path: '/' },

    //     component: Layout,
    //     children: [
    //         {
    //             //用户管理
    //             path: 'UserManagement',
    //             name:'用户管理',
    //             meta: {
    //                 title: '用户管理',
    //                 icon: 'el-icon-user',
    //             },
    //             component: () => import('../views/Users.vue')
    //         },
    //     ]

    // },
    // {
    //     path: '/AdministratorManagement',
    //      name:'管理员管理',
    //     meta: {
    //         title: '管理员管理',
    //         icon: 'el-icon-edit',
    //         hidden: true,
    //     },
    //     component: Layout,
    //     children: [
    //         {
    //             path: 'Administrator',
    //             name:'管理员',
    //             meta: {
    //                 title: '管理员',
    //                 icon: 'el-icon-edit-outline',
    //             },
    //             component: () => import('../views/Administrator.vue')
    //         }
    //     ]
    // },

    // {
    //     //文章管理
    //     path: '/ArticleManagement',
    //     name:'文章管理',
    //     meta: {
    //         title: '文章管理',
    //         icon: 'el-icon-notebook-1',
    //     },
    //     component: Layout,
    //     children: [{
    //         path: 'ArticleType',
    //         name:'文章类型',
    //         meta: {
    //             title: '文章类型',
    //             icon: 'el-icon-document-remove',
    //         },
    //         component: () => import('../views/ArticleType.vue')
    //     },
    //     {
    //         path: 'Article',
    //         name:'文章',
    //         meta: {
    //             title: '文章',
    //             icon: 'el-icon-document',
    //         },
    //         component: () => import('../views/Article.vue'),
    //         children: [
    //             {
    //                 path: 'ArticlePublished',
    //                 name:'文章已发布',
    //                 meta: {
    //                     title: '文章已发布',
    //                     icon: 'el-icon-circle-check',
    //                 },
    //                 component: () => import('../views/ArticlePublished.vue')
    //             },
    //             {
    //                 path: 'ArticleNotPublished',
    //                 name:'文章未发布',
    //                 meta: {
    //                     title: '文章未发布',
    //                     icon: 'el-icon-warning-outline',
    //                 },
    //                 component: () => import('../views/ArticleNotPublished.vue')
    //             },
    //             {
    //                 path: 'ArticleAdd',
    //                 name:'文章添加',
    //                 meta: {
    //                     title: '文章添加',
    //                     icon: 'el-icon-circle-plus-outline',
    //                 },
    //                 component: () => import('../views/ArticleAdd.vue'),
    //             },
    //         ]
    //     }
    //     ]

    // },
    // {
    //     path: '/WebsiteManagement',
    //     name:'网站管理',
    //     meta: {
    //         title: '网站管理',
    //         icon: 'el-icon-monitor',
    //     },
    //     component: Layout,
    //     children: [
    //         {
    //             path: 'RotationChart',
    //             name:'轮播图',
    //             meta: {
    //                 title: '轮播图',
    //                 icon: 'el-icon-view',
    //             },
    //             component: () => import('../views/RotationChart.vue')
    //         },
    //         {
    //             path: 'QRCode',
    //             name:'二维码',
    //             meta: {
    //                 title: '二维码',
    //                 icon: 'el-icon-news',
    //             },
    //             component: () => import('../views/QRCode.vue')
    //         },

    //         {
    //             path: 'WebsiteInformation',
    //             name:'网站信息',
    //             meta: {
    //                 title: '网站信息',
    //                 icon: 'el-icon-message',
    //             },
    //             component: () => import('../views/WebsiteInformation.vue')
    //         },
    //         {
    //             path: 'AboutOur',
    //             name:'关于我们',
    //             meta: {
    //                 title: '关于我们',
    //                 icon: 'el-icon-message',
    //             },
    //             component: () => import('../views/AboutOur.vue')
    //         },
    //     ]
    // },

]

export default routes